Skip metadata reconciliation after replica demotion - #1304
Skip metadata reconciliation after replica demotion#1304mohanrajendran wants to merge 4 commits into
Conversation
Signed-off-by: Mohan Rajendran <mohrjen@amazon.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan includes up to 2 reviews per rolling hour; 1 remains after this review. 📝 WalkthroughWalkthroughChangesMetadata demotion guard
Sequence Diagram(s)sequenceDiagram
participant AsyncMetadataRetrieval
participant MetadataManager
participant EventLoop
participant ContextFlags
AsyncMetadataRetrieval->>MetadataManager: deliver fetched metadata
MetadataManager->>EventLoop: queue reconciliation callback
ContextFlags->>MetadataManager: mark node as replica
EventLoop->>MetadataManager: execute queued callback
MetadataManager->>ContextFlags: check replica role
MetadataManager-->>MetadataManager: discard reconciliation
Suggested reviewers: Merge Risk: ⚪ Minimal · up to This change narrowly prevents stale metadata reconciliation after replica demotion, with targeted and full coordinator tests passing; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
|
/rerun |
|
/label 1.3.0 |
|
/assign-reviewers |
|
Reviewers for this PR
Assigned automatically to the least-assigned members of the reviewer pools in |
|
/reviewer BCathcart |
|
/reviewer Nivesh-01 |
Summary
Recheck the node role inside the queued
RunByMaincallback before reconciling asynchronously fetched metadata. If the node was demoted to a replica while the fetch was in flight, discard the stale reconciliation and avoid issuingFT.INTERNAL_UPDATEfrom a read-only node.The regression test deterministically queues the callback, demotes the node, and verifies that neither metadata callbacks nor
FT.INTERNAL_UPDATErun.Tests
./.build-debug/tests/coordinator_test --gtest_filter=*SkipsQueuedReconciliationAfterDemotion --gtest_brief=1./.build-debug/tests/coordinator_test --gtest_brief=1(44 tests passed)clang-format --dry-run --Werror src/coordinator/metadata_manager.cc testing/coordinator/metadata_manager_test.cc